feat(ci): Add the default user for docker execution#1036
Merged
dezhishen merged 7 commits intoOpenListTeam:mainfrom Aug 12, 2025
Merged
feat(ci): Add the default user for docker execution#1036dezhishen merged 7 commits intoOpenListTeam:mainfrom
dezhishen merged 7 commits intoOpenListTeam:mainfrom
Conversation
This was referenced Aug 11, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a default user configuration for Docker execution, improving security by running the container as a non-root user instead of root. The changes implement proper user creation and permission management in Docker containers.
Key changes:
- Adds user creation with configurable UID/GID in Dockerfiles
- Removes dynamic user switching from entrypoint script
- Improves aria2 service management with proper directory handling
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| Dockerfile | Adds user creation with default openlist user (UID 1001) and sets USER directive |
| Dockerfile.ci | Mirrors the user configuration changes from main Dockerfile |
| entrypoint.sh | Removes su-exec user switching and improves aria2 directory management logic |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: 我怎么就不是一只猫呢? <26274059+dezhishen@users.noreply.github.com>
…st into docker-add-default-user
jyxjjj
previously approved these changes
Aug 12, 2025
elysia-best
reviewed
Aug 12, 2025
elysia-best
previously approved these changes
Aug 12, 2025
TARGETPLATFORM only used in ci Signed-off-by: 我怎么就不是一只猫呢? <26274059+dezhishen@users.noreply.github.com>
elysia-best
approved these changes
Aug 12, 2025
huancun
approved these changes
Aug 12, 2025
Member
|
@dezhishen 发现个问题,仓库里面的 docker-compose.yml 没改 https://github.com/OpenListTeam/OpenList/blob/main/docker-compose.yml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
must merge the docker-library#12 first
测试镜像
base-image: dezhishen/openlist-base-image:aio
office-base-image: openlistteam/openlist-base-image:aio
test-image: dezhishen/openlist:aio-test
测试
构建自己的镜像
运行测试镜像
查看日志
查看文件夹权限
docker exec -it openlist-test ls -l /opt/service/start/ total 8 drwxr-xr-x 4 1000 1000 4096 Aug 11 08:10 aria2 drwxr-xr-x 3 1000 1000 4096 Aug 11 08:10 openlistdocker exec -it openlist-test ls -l /opt/openlist/data total 244 -rw-r--r-- 1 1000 1000 2768 Aug 11 08:10 config.json -rw-r--r-- 1 1000 1000 4096 Aug 11 08:10 data.db -rw-r--r-- 1 1000 1000 32768 Aug 11 08:10 data.db-shm -rw-r--r-- 1 1000 1000 197792 Aug 11 08:10 data.db-wal drwxr-xr-x 3 1000 1000 4096 Aug 11 08:10 log drwxr-xr-x 2 1000 1000 4096 Aug 11 08:10 temp